﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using DAL;
using Model;
namespace UI.system.page.admin
{
    public partial class adminpower : BaseAdmin
    {
        public AdminInfo info = new AdminInfo();
        public List<MenuInfo> menulist = new List<MenuInfo>();
        public List<MenuInfo> parentlist = new List<MenuInfo>();
        public List<BtnsInfo> btnslist = new List<BtnsInfo>();
        public string[] power;
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = JobRequest.GetRequestInt("id");
            menulist = MenuDAL.FindAll().Where(x=>x.Name!="菜单管理").ToList();
            parentlist = menulist.Where(x => x.ParentID == 0).ToList();
            btnslist = BtnsDAL.FindAll();
            if (id != 0)
            {
                info = AdminDAL.FindOneByID(id);
                power = info.Power.Split(',');
            }
        }
    }
}